package delivery.order.service.constant;

/*
文件夹路径说明
----xmService
---output
---LibreOffice
---Log
 */
public interface PathConstant {
    //模板路径
    String templatePath = "/template/delivery_note_v4.xlsx";

    static String getOutputFolderPath() {
        //文件输出路径
        String winOutputFolderPath = "D:/xmService/output";
        String linuxOutputFolderPath = "/xmService/output";
        String osName = System.getProperty("os.name").toLowerCase();
        return osName.contains("win") ? winOutputFolderPath : linuxOutputFolderPath;
    }


    static String getOfficeHome() {
        // LibreOffice 安装路径
        String WIN_OFFICE_HOME = "D:/xmService/LibreOffice";
        String LINUX_OFFICE_HOME = "/usr/lib/libreoffice";
        String osName = System.getProperty("os.name").toLowerCase();
        return osName.contains("win") ? WIN_OFFICE_HOME : LINUX_OFFICE_HOME;
    }

}
